Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/partial match #82

Open
wants to merge 10 commits into
base: enhancement/partialMatch
Choose a base branch
from

Conversation

jrabag
Copy link

@jrabag jrabag commented Aug 2, 2021

Description

Add partial report multitag

>>> from seqeval.metrics import classification_report
>>> y_true = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
>>> print(classification_report(y_true, y_pred, partial_match=True))

              precision    recall  f1-score   support

        MISC       0.75      1.00      0.86         3
         PER       1.00      1.00      1.00         2

   micro avg       0.83      1.00      0.91         5
   macro avg       0.88      1.00      0.93         5
weighted avg       0.85      1.00      0.91         5

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@jrabag jrabag closed this Aug 2, 2021
@jrabag jrabag reopened this Aug 3, 2021
@aenglebert
Copy link

Hello.
I'm interested in a partial match functionality in a use case where the detection of a mention is more important than the exact scope of the mention.
I see that this pull request hasn't moved in a long time. Are there still problems so that it hasn't been merged, or can it be used?
Thanks!

@chaojiang06
Copy link

Hey, I am also very interested in partial match cases, is there anything I can do regarding this commit to make it become the official function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants